//
//  UIColor+EPMColor.m
//  UICode001基本数据结构
//
//  Created by 马继鵬 on 17/2/12.
//  Copyright © 2017年 EPM. All rights reserved.
//

#import "UIColor+EPMColor.h"

@implementation UIColor (EPMColor)
+ (instancetype)EPM_randomColor
{
    return [UIColor colorWithRed:arc4random_uniform(256)/255.0 green:arc4random_uniform(256)/255.0 blue:arc4random_uniform(256)/255.0 alpha:1.0];
}

+(instancetype)EPM_colorWithHex:(int32_t)hex
{
    int red = (hex & 0xff0000 ) >> 16;
    int green = (hex & 0x00ff00) >> 8;
    int blue = (hex & 0x0000ff);
    return [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:1.0];
}
@end
